package common

import "gorm.io/gorm"

type Lists struct{}

func (l *Lists) Page(page, limit int) func(db *gorm.DB) *gorm.DB {
	return func(db *gorm.DB) *gorm.DB {
		return db.Limit(limit).Offset((page - 1) * limit)
	}
}
